-- 2023.2.14
USE CC_FE_TRIP
GO
-- 2023.2.14 增加结论文本
ALTER TABLE JB_Test_Result ADD ResultText nvarchar(50)
GO
-- 2023.2.14 JB_Test_Result 同步结论文本
UPDATE JB_Test_Result SET ResultText = 'Pass' where Result = 1   
GO
UPDATE JB_Test_Result SET ResultText = 'Fail' where Result = -1   
GO
UPDATE JB_Test_Result SET ResultText = 'NoTest' where Result = 0   
GO

-- 2023.3.2
USE CC_FE_TRIP
GO

-- 2023.3.2 JB_Bench_Basic_Setting 增加条码等待时间
ALTER TABLE JB_Bench_Basic_Setting ADD BarcodeWaitTime smallint
GO
-- 2023.3.2 JB_Bench_Basic_Setting 设置条码输入等待时间，同步设置采集数据本地保存 
UPDATE JB_Bench_Basic_Setting SET BarcodeWaitTime = 30, DAQDataFileTag = 1   
GO

-- 2023.3.2 JB_Product 增加修正力和修正行程
ALTER TABLE JB_Product ADD AdjustForce float
GO
ALTER TABLE JB_Product ADD AdjustTravel float
GO
-- 2023.3.2 JB_Product 设置默认修正力和修正行程 
UPDATE JB_Product SET AdjustForce = 0.0   
GO
UPDATE JB_Product SET AdjustTravel = 0.0  
GO

-- 2023.3.2 JB_Test_Result 增加修正力、修正行程、最大力（之前为测试力）、行程（之前为测试行程）
ALTER TABLE JB_Test_Result ADD AdjustMaxForce float
GO
ALTER TABLE JB_Test_Result ADD AdjustTravel float
GO
ALTER TABLE JB_Test_Result ADD MaxForceTotal float
GO
ALTER TABLE JB_Test_Result ADD TravelTotal float
GO
-- 2023.3.2 JB_Product 设置默认修正力、修正行程、最大力和行程
UPDATE JB_Test_Result SET AdjustMaxForce = 0.0   
GO
UPDATE JB_Test_Result SET AdjustTravel = 0.0  
GO
UPDATE JB_Test_Result SET MaxForceTotal = MaxForce   
GO
UPDATE JB_Test_Result SET TravelTotal = Travel   
GO

-- 2023.3.27
USE CC_FE_TRIP
GO

-- 2023.3.27 JB_Bench_Basic_Setting 增加力传感器报警设置参数
ALTER TABLE JB_Bench_Basic_Setting ADD ForceSensorAlarm float
GO
UPDATE JB_Bench_Basic_Setting SET ForceSensorAlarm = 5.0   
GO
